package com.huluobo.lib_base.room

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.huluobo.lib_base.entity.User

/**
 *  Created by LC on 2025/4/1.
 */
@Dao
interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun register(user: User): Long

    @Query("select * from user_info where username=:username and password=:password and role =:role")
    fun login(username: String, password: String, role: Int): User
}